package model.altarica_fields;

public class IntervalType {
	
	private int low_bound;
	private int high_bound;
	
	private String low_id = null;
	private String high_id = null;
	
	public IntervalType(){
		
		this.low_bound = 0;
		this.high_bound = 0;
		this.low_id = null;
		this.high_id = null;
	}
	
	public void setInterval(int low_bound, int high_bound) {
		
		this.low_bound = low_bound;
		this.high_bound = high_bound;
	}
	
	public void setInterval(String low_id, int high_bound) {
		
		this.low_id = low_id;
		this.high_bound = high_bound;
	}
	
	public void setInterval(int low_bound, String high_id) {
		
		this.low_bound = low_bound;
		this.high_id = high_id;
	}
	
	public void setInterval(String low_id, String high_id) {
		
		this.low_id = low_id;
		this.high_id = high_id;
	}
	
	public int getLowBound(){
		
		return low_bound;
	}
	
	public int getHighBound(){
		
		return high_bound;
	}
	
	public String toString(){
		
		String str = new String("[");
		
		if (low_id != null) {
			str += low_id;
		}else {
			str += low_bound;
		}
		
		str += ",";
		
		if (high_id != null) {
			str += high_id;
		}else {
			str += high_bound;
		}
		
		str += "]";
		
		return str;
	}

}
